Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update instructions to use this repo in README.md #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

remore
Copy link
Member

@remore remore commented Nov 21, 2024

I found the current instructions in README.md doesn't work in my environment. Below is the steps to repro;

$ mkdir /tmp/testdir && cd /tmp/testdir
$ mkdir public
$ echo "hello" > ./public/world.txt
$ npx @fastly/compute-js-static-publish@latest --root-dir=./public
$ cd ./compute-js
$ npm install     # nothing was installed
$ npm run start   # npm error Missing script: "start"
$ npm run deploy  # ERROR: error reading package size: stat pkg/compute-js-static-site.tar.gz: no such file or directory.

I used fastly compute serve and fastly compute publish to work around errors above, and looks it's working. These two commands are in fact shown after running npx @fastly/compute-js-static-publish@latest --root-dir=./public command as follows;

...
🚀 Compute application created!
Installing dependencies...
npm --prefix ./compute-js install

added 116 packages, and audited 117 packages in 14s

24 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities


To run your Compute application locally:

  cd ./compute-js
  fastly compute serve

To build and deploy to your Compute service:

  cd ./compute-js
  fastly compute publish

So I thought it could be a good idea to use fastly compute commands instead of npm commands from a consistency point of view too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant